1 REM *TOAD ROAD* TANDY 1000
2 REM COPYRIGHT 1990 BROOKS DEFOREST
5 SCREEN 2:SCREEN 3
10 DIM A(40):DIM B(60):DIM C(60):DIM D(60):DIM E(60):DIM F(40):DIM G(40):DIM H(40):DIM I(40):DIM J(40):DIM K(99):DIM L(99):DIM M(40)
11 DIM Z(40)
12 DIM ZZ(150)
13 FOR P=0 TO 15:PALETTE P,1:NEXT
16 COLOR 14:LOCATE 2,2:PRINT "GAME OVER"
17 LINE(7,6)-(81,16),15,B:LINE(6,5)-(82,17),7,B:LINE(5,4)-(83,18),8,B:GET(5,4)-(83,18),ZZ:CLS
19 BLOAD "TOAD.SPR":OPEN "I",#1,"TOAD.LOC"
20 FOR Z=1 TO 13
21 INPUT #1,A,B,C,D
22 IF Z=1 THEN GET(A-1,B+1)-(C+1,D-1),A
23 IF Z=2 THEN GET(A,B+1)-(C,D-1),B
24 IF Z=3 THEN GET(A,B+1)-(C+2,D-1),C
25 IF Z=4 THEN GET(A,B+2)-(C+2,D-2),D
26 IF Z=5 THEN GET(A-1,B+1)-(C,D-1),E
27 IF Z=6 THEN GET(A,B+1)-(C+1,D-1),F
28 IF Z=7 THEN GET(A-4,B)-(C-3,D-1),G
29 IF Z=8 THEN LINE(A-1,B)-(A-1,D),8:GET(A-1,B)-(C-2,D),H
30 IF Z=9 THEN GET(A,B)-(C,D),I
31 IF Z=10 THEN GET(A,B)-(C,D),J
32 IF Z=11 THEN GET(A,B)-(C,D),K
33 IF Z=12 THEN GET(A,B)-(C,D),L
34 IF Z=13 THEN GET(A,B)-(C,D),M
50 NEXT:CLOSE
55 SOUND ON:PLAY "MB"
60 GOSUB 1002
100 CLS
101 S=0:L=3:PUT(10,0),M:PUT(20,0),M:PUT(30,0),M
102 COLOR 15:LOCATE 1,9:PRINT "000"
103 LV=1:SNK=0
104 LOCATE 1,17:COLOR 12:PRINT HI$
105 LINE(0,30)-(159,100),9,BF:LINE(0,8)-(159,29),2,BF:LINE(0,199)-(159,181),8,BF:LINE(0,199)-(159,199),7:LINE(0,181)-(159,181),7:LINE(0,8)-(159,13),10,BF
106 LINE(0,101)-(159,119),8,BF:LINE(0,101)-(159,101),7:LINE(0,119)-(159,119),7
107 B=2:FOR Y=24 TO 29:FOR C=1 TO B:PSET(RND*160,Y),14:NEXT:B=B+B:NEXT
108 PUT(10,8),K,PSET:PUT(50,8),K,PSET:PUT(90,8),K,PSET:PUT(130,8),K,PSET
110 LX=0:PX=60:LY=35
111 T1=90:T2=10:T3=123:T4=42
112 X=78:Y=183:PUT(X,Y),I:PUT(20,58),A,PSET:PUT(120,58),A,PSET:PUT(70,58),A,PSET
113 FOR A=-10 TO 170 STEP 46:LINE(A,147)-(A+20,147),15:NEXT
114 IF LV=2 THEN SNK=1
115 IF Y<98 THEN PUT(X,Y),I
120 PUT(LX,LY),B,PSET:IF LO=0 THEN LX=LX+2:GOSUB 200 ELSE LX=LX-2:GOSUB 200
126 IF SNK=1 THEN PUT(SX,107),H,PSET:SX=SX+3:GOSUB 270:IF SX>140 THEN LINE(SX,107)-(159,113),8,BF:SX=2:PUT(SX,107),H,PSET
130 IF Y<98 THEN PUT(X,Y),I
140 IF SNK=0 THEN T1=T1-2:PUT(T1,133),C,PSET:IF T1<2 THEN LINE(T1,133)-(T1+23,146),0,BF:T1=134
145 T2=T2+3:PUT(T2,150),E,PSET:IF T2>125 THEN LINE(T2,150)-(T2+30,161),0,BF:T2=3
150 T3=T3-3:PUT(T3,165),F,PSET:IF T3<4 THEN LINE(T3,165)-(T3+11,173),0,BF:T3=142
155 T4=T4+4:PUT(T4,122),G,PSET:IF T4>145 THEN LINE(T4,122)-(159,130),0,BF:T4=2
160 IF STICK(0)<10 AND X>10 THEN D=-2:GOSUB 210 ELSE IF STICK(0)>100 AND X<140 THEN D=2:GOSUB 210
165 IF STRIG(1)=-1 THEN D=-4:GOSUB 215
170 IF Y<115 THEN 175 ELSE Q=POINT(X-3,Y+5)+POINT(X+9,Y+5)+POINT(X+3,Y-2)+POINT(X+3,Y+13):IF Q>0 THEN 225
175 GOTO 250
199 GOTO 115
200 IF LX>133 OR LX<2 THEN 204 ELSE RETURN
204 LINE(LX,LY)-(LX+27,LY+11),9,BF:IF LO=0 THEN LO=1:LX=132:LY=82 ELSE LO=0:LX=2:LY=35
205 RETURN
210 PUT(X,Y),I:X=X+D:PUT(X,Y),I:NOISE 4,15,.5:RETURN
215 PUT(X,Y),I:Y=Y+D:IF Y<101 THEN Y=Y+(D/2):NOISE 0,15,.5
216 IF Y<20 THEN 260
217 PUT(X,Y),I:NOISE 2,15,.5:NOISE 1,15,.5
218 IF Y=103 THEN COLOR 15:S=S+1:S$=STR$(S):S$=RIGHT$(S$,LEN(S$)-1):S$=STRING$(3-LEN(S$),"0")+S$:LOCATE 1,9:PRINT S$:FOR V=15 TO 8 STEP -2:NOISE 4,V,1:SOUND RND*999,1,V,0:NEXT
219 RETURN
225 IF Y>168 OR Y<112 THEN 115
226 IF Y<121 AND Y>109 AND POINT(X-3,Y+5)=0 AND POINT(X+9,Y+5)=0 AND POINT(X+3,Y+13)=0 THEN 115
230 PUT(X,Y),J
235 FOR A=200 TO 50 STEP -9:SOUND A,1,15,0:SOUND A+11,1,15,1:SOUND A+8,1,15,2:NEXT
240 IF L=3 THEN PUT(30,0),M ELSE IF L=2 THEN PUT(20,0),M ELSE PUT(10,0),M
241 IF L=1 THEN 249
245 L=L-1:LINE(0,30)-(159,199),0,BF
246 LINE(0,30)-(159,100),9,BF:LINE(0,199)-(159,181),8,BF:LINE(0,199)-(159,199),7:LINE(0,181)-(159,181),7:LINE(0,101)-(159,119),8,BF:LINE(0,101)-(159,101),7:LINE(0,119)-(159,119),7
247 FOR A=-10 TO 170 STEP 46:LINE(A,147)-(A+20,147),15:NEXT:X=78:Y=183:PUT(X,Y),I
248 IF LV<3 THEN PUT(20,58),A,PSET:PUT(120,58),A,PSET:PUT(70,58),A,PSET:GOTO 115 ELSE X=78:Y=183:PUT(X,Y),I:IF LV=3 THEN 302 ELSE IF LV=4 THEN 405
249 GOTO 1000
250 IF POINT(X+3,Y+13)=9 AND POINT(X+3,Y-2)=9 THEN 230 ELSE 115
251 IF FS=1 THEN PUT(10,8),L,PSET ELSE IF FS=2 THEN PUT(50,8),L,PSET ELSE IF FS=3 THEN PUT(90,8),L,PSET ELSE IF FS=4 THEN PUT(130,8),L,PSET
252 RETURN
260 FS=FS+1
261 IF FS=1 THEN PUT(10,8),L,PSET ELSE IF FS=2 THEN PUT(50,8),L,PSET ELSE IF FS=3 THEN PUT(90,8),L,PSET ELSE IF FS=4 THEN PUT(130,8),L,PSET
262 S=S+5
263 FOR A=400 TO 1300 STEP 55:SOUND A,1,15,0:SOUND A*2,1,15,1:SOUND RND*A,1,15,2:NEXT:FOR V=15 TO 0 STEP -1:SOUND A/(16-V),1,V,0:SOUND A/(32-V),1,V,1:SOUND V*19,1,V,2:NEXT:COLOR 15:S$=RIGHT$(STR$(S),LEN(STR$(S))-1):S$=STRING$(3-LEN(S$),"0")+S$:LOCATE 1,9
264 PRINT S$:X=78:Y=183:PUT(X,Y),I:IF FS=4 THEN 265 ELSE 115
265 FS=0:FOR A=1 TO 4
266 IF A=1 THEN PUT(10,8),K,PSET ELSE IF A=2 THEN PUT(50,8),K,PSET ELSE IF A=3 THEN PUT(90,8),K,PSET ELSE PUT(130,8),K,PSET
267 S=S+10:S$=RIGHT$(STR$(S),LEN(STR$(S))-1):S$=STRING$(3-LEN(S$),"0")+S$:LOCATE 1,9:PRINT S$
268 FOR V=15 TO 5 STEP -2:SOUND 999,1,V,0:SOUND 1050,1,V,1:NOISE 4,V,1:NEXT
269 NEXT:LV=LV+1:IF LV=2 THEN SNK=1:LINE(T1,133)-(T1+23,146),0,BF:GOTO 115 ELSE IF LV=3 THEN PUT(X,Y),I:GOTO 300 ELSE IF LV=4 THEN PUT(X,Y),I:GOTO 400
270 IF Y<113 AND Y>93 AND SX-6<X AND SX+16>X THEN RETURN 230 ELSE RETURN
271 IF Y<113 AND Y>90 AND T5-6<X AND T5+16>X THEN PUT(X,Y),I:Y=Y+4:RETURN 230 ELSE RETURN
280 IF Y>172 AND T6-6<X AND T6+16>X THEN RETURN 230 ELSE RETURN
281 IF Y>168 OR Y<112 THEN 310
282 IF Y<121 AND Y>109 AND POINT(X-3,Y+5)=0 AND POINT(X+9,Y+5)=0 AND POINT(X+3,Y+13)=0 THEN 310
283 GOTO 230
291 IF Y=171 THEN 296 ELSE IF Y<112 OR Y>168 THEN 405
292 IF Y<121 AND Y>109 AND POINT(X-3,Y+5)=0 AND POINT(X+9,Y+5)=0 AND POINT(X+3,Y+13)=0 THEN 405
293 GOTO 230
296 IF POINT(X+3,Y-2)=0 THEN 405 ELSE 230
300 LINE(0,30)-(159,100),9,BF:LINE(0,101)-(159,119),8,BF:LINE(0,101)-(159,101),7:LINE(0,119)-(159,119),7
301 PUT(10,8),K,PSET:PUT(50,8),K,PSET:PUT(90,8),K,PSET:PUT(130,8),K,PSET
302 T1=30:T2=19:T3=112:T4=110:T5=52:T6=120:L1=70:A1=0:A2=0:A3=0:A4=0:A5=0:FH=0:L2=20:L3=130
303 LINE(0,120)-(159,180),0,BF
304 FOR A=-10 TO 170 STEP 46:LINE(A,147)-(A+20,147),15:NEXT
305 X=78:Y=183:PUT(X,Y),I
306 IF LV=4 THEN 400
310 IF A1=0 THEN T1=T1-4:PUT(T1,134),D,PSET:IF T1<4 THEN LINE(T1,134)-(T1+11,140),0,BF:T1=141:IF FH=1 THEN A1=1
311 IF A2=0 THEN T2=T2+4:PUT(T2,167),G,PSET:IF T2>141 THEN LINE(T2,167)-(159,175),0,BF:T2=3:IF FH=1 THEN A2=1
312 IF A3=0 THEN T3=T3-4:PUT(T3,153),D,PSET:IF T3<4 THEN LINE(T3,153)-(T3+11,170),0,BF:T3=141:IF FH=1 THEN A3=1
313 IF A4=0 THEN T4=T4+4:PUT(T4,125),G,PSET:IF T4>141 THEN LINE(T4,125)-(159,133),0,BF:T4=3:IF FH=1 THEN A4=1
314 PUT(T5,107),H,PSET:T5=T5+4:GOSUB 271:IF T5>140 THEN LINE(T5,107)-(159,113),8,BF:T5=RND*4
315 IF A5=0 THEN PUT(T6,186),H,PSET:T6=T6+4:GOSUB 280:IF T6>140 THEN LINE(T6,186)-(159,192),8,BF:T6=RND*4:IF FH=1 THEN A5=1
316 IF Y<98 THEN PUT(X,Y),I
317 IF FH=1 THEN L1=L1-2:PUT(L1,80),A,PSET:IF L1<3 THEN LINE(L1,80)-(L1+18,95),9,BF:L1=140
318 IF Y<98 THEN PUT(X,Y),I
320 IF FH=1 THEN PUT(L2,40),A,PSET:L2=L2-2:IF L2<3 THEN LINE(L2,40)-(L2+18,55),9,BF:L2=140
321 IF FH=1 THEN PUT(L3,61),A,PSET:L3=L3+2:IF L3>140 THEN LINE(L3,61)-(L3+18,76),9,BF:L3=3
360 IF STICK(0)<10 AND X>10 THEN D=-2:GOSUB 210 ELSE IF STICK(0)>100 AND X<140 THEN D=2:GOSUB 210
365 IF STRIG(1)=-1 THEN D=-4:GOSUB 215
370 IF Y<115 THEN 375 ELSE Q=POINT(X-4,Y+5)+POINT(X+10,Y+5)+POINT(X+3,Y-2)+POINT(X+3,Y+13):IF Q>0 THEN 281 ELSE 310
375 FH=1:IF POINT(X+3,Y+13)=9 AND POINT(X+3,Y-2)=9 THEN 230 ELSE 310
395 GOTO 310
400 T1=60:T2=130:T3=10:T4=80:T5=10:T6=90:XX=RND*130
401 A1=0:A2=0:A3=0:A4=0:A5=0:FH=0:T=0
405 IF A1=0 THEN T1=T1-4:PUT(T1,158),C,PSET:IF T1<4 THEN LINE(T1,158)-(T1+24,169),0,BF:T1=135:IF FH=1 THEN A1=1
406 IF A2=0 THEN T2=T2-4:PUT(T2,158),C,PSET:IF T2<4 THEN LINE(T2,158)-(T2+24,169),0,BF:T2=135:IF FH=1 THEN A2=1
407 IF A3=0 THEN T3=T3+4:PUT(T3,130),E,PSET:IF T3>128 THEN LINE(T3,130)-(159,141),0,BF:T3=3:IF FH=1 THEN A3=1
408 IF A4=0 THEN T4=T4+4:PUT(T4,130),E,PSET:IF T4>128 THEN LINE(T4,130)-(159,141),0,BF:T4=3:IF FH=1 THEN A4=1
409 PUT(T5,107),H,PSET:T5=T5+4:GOSUB 271:IF T5>140 THEN LINE(T5,107)-(159,113),8,BF:T5=RND*4
410 IF A5=0 THEN PUT(T6,186),H,PSET:T6=T6+4:GOSUB 280:IF T6>140 THEN LINE(T6,186)-(159,192),8,BF:T6=RND*4:IF FH=1 THEN A5=1
411 IF FH=1 THEN PUT(X,Y),I:PUT(L1,40),A,PSET:L1=L1-2:IF L1<3 THEN LINE(L1,40)-(L1+18,55),9,BF:L1=140
412 IF FH=0 THEN 460
413 T=T+1:IF T=5 THEN PUT(XX,60),B,OR ELSE IF T=10 THEN PUT(XX,60),B,PSET ELSE IF T=15 THEN LINE(XX,60)-(XX+25,75),9,BF:PUT(XX,60),B,OR ELSE IF T=20 THEN LINE(XX,60)-(XX+25,75),9,BF:T=0:XX=RND*130
414 PUT(X,Y),I
415 PUT(L2,80),A,PSET:L2=L2+2:IF L2>140 THEN LINE(L2,80)-(L2+18,95),9,BF:L2=3
460 IF STICK(0)<10 AND X>10 THEN D=-2:GOSUB 210 ELSE IF STICK(0)>100 AND X<140 THEN D=2:GOSUB 210
465 IF STRIG(1)=-1 THEN D=-4:GOSUB 215
470 IF Y<115 THEN 475 ELSE Q=POINT(X-4,Y+5)+POINT(X+10,Y+5)+POINT(X+3,Y-2)+POINT(X+3,Y+13):IF Q>0 THEN 291 ELSE 405
475 FH=1:IF POINT(X+3,Y+13)=9 AND POINT(X+3,Y-2)=9 THEN 230 ELSE 405
495 GOTO 405
1000 PUT(40,80),ZZ,PSET:FOR V=15 TO 0 STEP -1:FOR A=900 TO 500 STEP -50:SOUND A,1,V,0:SOUND A*2,1,V,1:SOUND A*3,1,V,2:NOISE 5,V,1:NEXT:NEXT
1001 FOR P=1 TO 100:NEXT:IF S>HI THEN HI$=S$
1002 SCREEN 4:CLS:PALETTE 1,0:COLOR 1:LOCATE 10,8:PRINT "PROGRAMMED BY B.DEFOREST":LOCATE 14,7:PRINT "(C) 1990 RUFUSPRO SOFTWARE"
1003 SCREEN 3,1,0,0,0:COLOR 7:LOCATE 21,4:PRINT "<PRESS  FIRE>"
1004 PALETTE 1,4:PALETTE 4,13:PALETTE 5,12
1005 FOR P=8 TO 15:PALETTE P,0:NEXT:PALETTE 3,8:PALETTE 6,7:PALETTE 7,15
1006 COLOR 2:LOCATE 5,6:PRINT "TOAD ROAD"
1007 LINE(38,30)-(114,40),3,B:LINE(37,29)-(115,41),6,B:LINE(36,28)-(116,42),7,B
1010 C=8:FOR A=8 TO 0 STEP -1:LINE(A,A)-(159-A,199-A),C,B:C=C+1:NEXT
1015 A1=8:A2=9:A3=10
1020 A1=A1+1:A2=A2+1:A3=A3+1
1021 IF A1=16 THEN A1=8 ELSE IF A2=16 THEN A2=8 ELSE IF A3=16 THEN A3=8
1022 PALETTE A1,5:PALETTE A2,13:PALETTE A3,12
1023 IF A1<>8 THEN PALETTE A1-1,0 ELSE PALETTE 15,0
1025 IF STRIG(1)=-1 THEN SCREEN 2:SCREEN 3:GOTO 100
1026 IF INKEY$=CHR$(27) THEN SCREEN 2:SCREEN 0:PRINT "Tandy DOS V2.1":NEW
1039 GOTO 1020
